<template>
<div class="sreach">
<div class="left"> 
<p>{{name}}</p>
<el-input
  placeholder="请输入名字"
  v-model="inputname">
</el-input>
<p>{{num}}</p>
<el-input
  placeholder="请输人..."
  v-model="inputnum">
</el-input>
</div>


 
  <div class="rig">
    <el-button type="primary" size="mini" icon="el-icon-search" @click="sreachfun">搜索</el-button>
  </div>
  </div>

</template>

<script>
  export default {
    data() {
      return {
        inputname: '',
        inputnum:'',
        name:'用户名 :',
        num:'警员编号 :',
        
      }
    },
    methods:{
      sreachfun(){
        this.$emit('parentsearch',this.inputname)
        // this.$emit('parentsea',this.inputnum)
      }
    }
  }
</script>


<style lang="less" scoped>


.sreach{
    height:60px;
    background-color:white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .left{
      
      margin-left: 5%;
        width: 60%;
        display: flex;
    align-items: center;

      background-color:white;
        
        p{
          width: 160px;
          font-size: 14px;
        }
        /deep/.el-input__inner{ //less语法2 提高class的层级 /deep/
            width:150px;
            height: 20px;
          
    }}
    .rig{
      margin-right: 14%;
    }
}

</style>